forum

Home / DeveloperSection / Forums / XML Record Value in mvc

XML Record Value in mvc

Anonymous User207809-Nov-2014

I have an xml file:

<profiles><profileusername="user4"fullname="Full Name"/></profiles>

I am trying to retrive the value of the fullname, here is what I tried:

publicList<string>GetFullName(string username){List<Profile> list =null;try{ list =(from t inProfileListwhere t.UserName== username select t).FirstOrDefault();}catch{}List<string> userFullName =newList<string>();if(list !=null){foreach(Profile t in list){ userFullName.Find(t.FullName);}}return userFullName;}

FirstOrDefault gives an error!


Updated on 10-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By